﻿<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<dynamic>" %>

<% MySkiPatrolSite.AdminSvc.Patrol patrol = null;
   string weatherZipCode = string.Empty;
   string weatherHTML = string.Empty;
    
    if (Session["PATROL"] != null) { patrol = (MySkiPatrolSite.AdminSvc.Patrol)Session["PATROL"];  };

    if (patrol != null)
    {
        if (patrol.ApplicationSettings != null)
        {
            foreach (MySkiPatrolSite.AdminSvc.AppSetting setting in patrol.ApplicationSettings)
            {
                if (setting.Name.ToUpper() == "WEATHERZIPCODE")  
                {
                    weatherZipCode = setting.Value;
                }
            }
        }
        
        //using the old weather for now...

        if (patrol.WeatherForecast != null) weatherHTML = patrol.WeatherForecast.HTML;
    }

    %>

    <% Response.Write(weatherHTML); %>

